package com.wang.learn.gen.processor;

import com.wang.learn.gen.spi.CodeGenProcessor;

import javax.annotation.processing.RoundEnvironment;
import javax.lang.model.element.TypeElement;
import java.lang.annotation.Annotation;

/**
 * <p>TODO</p>
 *
 * @author wcz
 * @version V1.0.0
 * @date 2022/11/22 23:03
 */
public abstract class BaseCodeGenProcessor implements CodeGenProcessor {

    public static final String PREFIX = "Base";
    @Override
    public void generate(TypeElement typeElement, RoundEnvironment roundEnvironment) {
        generateClass(typeElement,roundEnvironment);
    }

    /**
     * 生成class类，需要与注解相关的执行器自行实现
     * @param typeElement
     * @param roundEnvironment
     */
    protected abstract void generateClass(TypeElement typeElement, RoundEnvironment roundEnvironment);



}
